package whu.o2o;



import whu.o2o.util.ConstantData;

import whu.o2o.R;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;

public class ShowFrontActivity extends BaseActivity {
	private Handler mHandler = new Handler(new Handler.Callback() {

		@Override
		public boolean handleMessage(Message msg) {
			boolean isFirst = mApplication.getSharedPreferences().getBoolean(ConstantData.SharedPrefs.SPLASH, true);

			Class<?> className;
			if (isFirst) {
				className = TweenActivity.class;
			} else {
			//	className = MainActivity.class;//如果不是第一次进来，就去主界面
			//	sleep() ;
				className = TweenActivity.class;
				
			}

			Intent intent = new Intent(mContext, className);
			startActivity(intent);
			finish();
			return false;
		}
	});
	private void sleep() {

		try {

			Thread.sleep(1000);
			Log.d("sleep", "qqqq");

		} catch (InterruptedException e) {

		}

	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_show_front);
		mHandler.sendEmptyMessageDelayed(0, 2000);

	}
}